#ifndef MYTREEWIDGET_H
#define MYTREEWIDGET_H

#include <QTreeWidget>
#include <QKeyEvent>
#include <QApplication>
#include <QDrag>
#include "TreeItemMimeData.h"

class MyTreeWidget :public QTreeWidget
{
	Q_OBJECT
public:
	MyTreeWidget(QWidget *parent = NULL);
	~MyTreeWidget();

protected:
	void mouseMoveEvent(QMouseEvent *event);
	void mousePressEvent(QMouseEvent *event);
	void mouseReleaseEvent(QMouseEvent *event);

	void dragEnterEvent(QDragEnterEvent *event);
	void dragMoveEvent(QDragMoveEvent *event);
	void dropEvent(QDropEvent *event);
	void keyPressEvent(QKeyEvent *event);
	void keyReleaseEvent(QKeyEvent *event);
private:
	QPoint     m_startDragPoint;
	void       performDrag();
	bool       m_CtrlPressed;

};

#endif
